package main.java.service.impl;

import main.java.dao.UserDao;
import main.java.dao.impl.UserDaoImpl;
import main.java.service.UserService;

import java.util.List;

public abstract class UserServiceImpl implements UserService {

    UserDao userDao = new UserDaoImpl() {
        @Override
        public List<main.java.pojo.User> findAll(Object obj) {
            // 实现 findAll 方法的具体逻辑
            return null;

    };

    @Override
        public int addUser(main.java.pojo.User user) {
            return 0;
        }

        @Override
        public main.java.pojo.User findById(Integer id) {
            return null;
        }

        @Override
        public int updateUser(main.java.pojo.User user) {
            return 0;
        }

        @Override
        public int deleteUserById(Integer id) {
            return 0;
        }

        @Override
        public int deleteUser(int id) {
            return 0;
        }

        @Override
        public main.java.pojo.User findUserById(int id) {
            return null;
        }
    };
    private Object User;

    @Override
    public int addUser(main.java.pojo.User user) {
        return userDao.addUser(user);
    }

    @Override
    public List<main.java.pojo.User> findAll() {

        List<main.java.pojo.User> users = userDao.findAll(User);

        return users;
    }

    @Override
    public main.java.pojo.User findById(Integer id) {
        return userDao.findById(id);
    }

    @Override
    public int updateUser(main.java.pojo.User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUserById(Integer id) {
        return userDao.deleteUserById(id);
    }
}
